custom taxonomy pagination 404

64

function modify_product_cat_query( $query ) {
  if (!is_admin() && $query->is_tax("product_cat")){
       $query->set('posts_per_page', 2);
  }
}
add_action( 'pre_get_posts', 'modify_product_cat_query' );

Comments

Submit
0 Comments